/*
 * Copyright (c) 2021. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

import java.util.Scanner;

/**
 * 输入数字1-26，按下面的格式输出字母,金字塔字母
 */
public class HomeWork0312407 {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int max = 0;
        System.out.println("abc");

        while(true) {
            System.out.println("请输入1-26的数:");
            try {
                max = sc.nextInt();
            }catch (Exception ex){
                System.out.println("您输入的不是数字");
                sc.next();
                continue;
            }
            if(max>0&&max<=26){
                break;
            }else{
                System.out.println("您输入的数字"+max+"是不符合规范的");
            }
        }
        char c = 'A';
        for(int i=0;i<max;i++,c++){
            for(int j=0;j<max-i;j++){
                System.out.print(" ");
            }
            for(int j=0;j<2*i+1;j++){
                System.out.print(c);
            }
            System.out.println();
        }
    }
}
